package com.dahai.filter;

import javax.servlet.*;
import java.io.IOException;
import java.io.PrintWriter;

public class CharsetFilter implements Filter {

    private String name;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        //这是字符集的过滤器
        System.out.println("这是字符集的过滤器");
        chain.doFilter(request,response);
    }

    @Override
    public void destroy() {

    }
}
